using octalforty.Brushie.Web.XmlRpc;

namespace octalforty.Syndication.Blogging.MetaWeblog
{
    /// <summary>
    /// Contains information about a <see cref="MediaObject"/> after it's been posted
    /// using <see cref="IMetaWeblogService.NewMediaObject"/>.
    /// </summary>
    [XmlRpcStructure()]
    public class MediaObjectInfo
    {
        #region Private Member Variables
        private string url;
        #endregion

        #region Public Properties
        /// <summary>
        /// Gets or sets a string which contains an URL of the previously created <see cref="MediaObject"/>.
        /// </summary>
        [XmlRpcMember("url")]
        public string Url
        {
            get { return url; }
            set { url = value; }
        }
        #endregion

        /// <summary>
        /// Initializes a new instance of <see cref="MediaObjectInfo"/> class.
        /// </summary>
        public MediaObjectInfo()
        {
        }

        /// <summary>
        /// Initializes a new instance of <see cref="MediaObjectInfo"/> class.
        /// </summary>
        /// <param name="url"></param>
        public MediaObjectInfo(string url)
        {
            this.url = url;
        }
    }
}
